<?php
require_once ("includes/header.inc.php");

$_SESSION['redirect_rijschool'] = true;
$_SESSION['redirect_rijschool_handle'] = $_GET['handle'];

// Determine if it is a beta rijschool
$wsclient = new SoapClient($config['dashboard_wsdl'], array(
    'trace'=>1,
    'encoding' => 'ISO-8859-1',
    'classmap' => 
        array(
            'Adres'=>"Adres",
            'AgendaBlok'=>"AgendaBlok",
            'AgendaItem'=>"AgendaItem",
            'AgendaItemType'=>"AgendaItemType",
            'AgendaTheorie'=>"AgendaTheorie",
            'Cursus'=>"Cursus",
            'CursusStatistiek'=>"CursusStatistiek",
            'Factuur'=>"Factuur",
            'FactuurRegel'=>"FactuurRegel",
            'Instructeur'=>"Instructeur",
            'Leerling' => "Leerling",
            'LeerlingReactie'=>"LeerlingReactie",
            'Object'=>"Object",
            'Transactie'=>"Transactie",
            'VekaTheorieCursus'=>"VekaTheorieCursus",
            'VekaTheorieDetails'=>"VekaTheorieDetails",
            'VekaTheorieModule'=>"VekaTheorieModule",
            'VekaTheorieZwakkePunten'=>"VekaTheorieZwakkePunten",
            'VorderingFase'=>"VorderingFase",
            'VorderingKaart'=>"VorderingKaart",
            'VorderingNotitie'=>"VorderingNotitie",
            'VorderingRegel'=>"VorderingRegel",
            'VorderingResultaat'=>"VorderingResultaat",
        )
    )
);

$rijschool = $wsclient->WS_Rijschool_Info(
    array(
        'Handle' => $_GET['handle']
    )
);

if ($rijschool->Beta) {
    Header("Location: http://beta.rijlesplanner.nl/" . $_GET['handle']);
    exit;
}

# Wolf locaties krijgen een andere opmaak (Wolf locaties van 28-11-2008)

if ($_GET['handle'] == "wolfamersfoort" || $_GET['handle'] == "wolfamsterdam" || $_GET['handle'] == "wolfapeldoorn" || $_GET['handle'] == "wolfarnhem" || $_GET['handle'] == "wolfbergenopzoom" || $_GET['handle'] == "wolfbreda" || $_GET['handle'] == "wolfdenbosch" || $_GET['handle'] == "wolfdenhaag" || $_GET['handle'] == "wolfdordrecht" || $_GET['handle'] == "wolfeindhoven" || $_GET['handle'] == "wolfgoes" || $_GET['handle'] == "wolfgroningen" || $_GET['handle'] == "wolfhaarlem" || $_GET['handle'] == "wolfhilversum" || $_GET['handle'] == "wolfmaastricht" || $_GET['handle'] == "wolfnijmegen" || $_GET['handle'] == "wolfrotterdam" || $_GET['handle'] == "wolftilburg" || $_GET['handle'] == "wolfutrecht" || $_GET['handle'] == "wolfvlissingen" || $_GET['handle'] == "wolfzaandam") {
	$_SESSION['LayoutStyle'] = 'wolf';
}
header('Location:' . $_SESSION['config']['siteurl'] . '/');
?>
